home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 3 / AUCD3.iso / airport / browsers / acornet / archive / archive897 / 000110_owner-acornet@…s.barnet.ac.uk _Fri Aug 22 12:00:51 1997.msg < prev    next >
Internet Message Format  |  1997-08-28  |  3KB

  1. Received: (from majordomo@localhost)
  2.     by odie.barnet.ac.uk (8.8.6/8.8.6) id MAA19192
  3.     for acornet-list; Fri, 22 Aug 1997 12:00:51 +0100
  4. Received: from delenn.ecs.soton.ac.uk (snb94r@delenn.ecs.soton.ac.uk [152.78.67.42])
  5.     by odie.barnet.ac.uk (8.8.6/8.8.6) with SMTP id MAA19188
  6.     for <acornet@lists.barnet.ac.uk>; Fri, 22 Aug 1997 12:00:37 +0100
  7. Received: from localhost ([127.0.0.1]) by delenn.ecs.soton.ac.uk with SMTP; Fri, 22 Aug 1997 11:02:25 GMT
  8. Date: Fri, 22 Aug 1997 11:54:27 +0100
  9. From: Stewart Brodie <snb94r@delenn.ecs.soton.ac.uk>
  10. To: acornet@lists.barnet.ac.uk
  11. Subject: Re: Acornet 0.20 - a few suggestions
  12. Message-ID: <ca1e99bd47%snb94r@delenn.ecs.soton.ac.uk>
  13. In-Reply-To: <4943bd47%esuvf@dial1221.dialup.warwick.ac.uk>
  14. Organization: University of Southampton
  15. X-Mailer: Messenger v1.02 for RISC OS
  16. X-Posting-Agent: RISC OS Newsbase 0.59c
  17. Sender: owner-acornet@lists.barnet.ac.uk
  18. Precedence: bulk
  19. Reply-To: acornet@lists.barnet.ac.uk
  20. X-maillist: acornet
  21.  
  22. In message <4943bd47%esuvf@dial1221.dialup.warwick.ac.uk> you wrote:
  23.  
  24. > I'd already tried putting Acornet in a directory called Internet, and
  25. > it worked fine... but, I just tried renaming my harddisc to
  26. > 'IDEDisc4' too - and bootapps dies :-(
  27. > Although for me it dies booting !SerialDev.
  28. > As far as I can tell, this is some form of 'race' condition in ROS
  29. > 3.1. It only seems to go wrong when done inside the bootapps program,
  30. > and when done in at least the same order or something (ie. sticking a
  31. > filer_boot ADFS::..blahblah...temp.!SerialDev at the beginning of
  32. > Bootapps didn't produce an error, and in fact enabled boots to
  33. > happily continue and get past serial dev, and then dies on !WebHelper
  34. > instead.
  35. > I'm at a lost to explain why, or to suggest a solution other than
  36. > renaming the directory. Perhaps someone who knows more about these
  37. > sorts of things than me could shed some light?
  38.  
  39. This is a complete stab in the dark, but it's a daft problem that I've hit in
  40. the past and if it turns out to be your problem too, you'll never find it
  41. easily :-)
  42.  
  43. What rings a bell is the changing of the directory names making it work ...
  44. Obviously the actually name of the directory cannot affect the working of
  45. the applications unless that the pathnames have been hardwired in.  This
  46. would seem to imply that pathnames of a particular *length* are causing
  47. problems - perhaps when they are an exact multiple of four.  Check all the
  48. length limited string handling in the program.  If, for example, you were to
  49. say:
  50.  
  51. const int length = strlen(s1);
  52. char *const p = calloc(1, length);
  53. memcpy(p, s1, length);
  54.  
  55. Then this would work[1] *UNLESS* the length of s1 was an exact multiple of
  56. four. This is just a consequence of the way that the C library's malloc code
  57. will round up the size to the nearest multiple of four and zero all of the
  58. data  hence giving you an implicit zero terminator without you realising it. 
  59. The only time when this wouldn't work would be if the length was already a
  60. multiple of four.
  61.  
  62. Given that a previous correspondent mentioned that changing the disc name
  63. solved the problem too, this would seem to fit in with my suggestion too.
  64.  
  65.  
  66. [1] Potentially - officially it's undefined behaviour.
  67.  
  68. -- 
  69. Stewart Brodie, Electronics & Computer Science, Southampton University.
  70. http://www.ecs.soton.ac.uk/~snb94r/